<template>
  <div class="error-page">
    <div class="error-container">
      <h1 class="error-code">404</h1>
      <h2 class="error-message">页面不存在</h2>
      <p class="error-description">您访问的页面不存在或已被删除</p>
      <Button @click="goHome" class="mt-4">
        返回首页
      </Button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import Button from 'primevue/button'

const router = useRouter()

// 返回首页
const goHome = () => {
  router.push('/dashboard')
}
</script>

<style scoped>
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: #f5f5f5;
}

.error-container {
  text-align: center;
  padding: 40px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-code {
  font-size: 72px;
  font-weight: bold;
  color: #ff4d4f;
  margin: 0 0 20px 0;
}

.error-message {
  font-size: 24px;
  color: #333;
  margin: 0 0 10px 0;
}

.error-description {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px 0;
}
</style>